home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / Ex_Right.dxr / 00001.ls next >
Encoding:
Text File  |  1998-07-22  |  923 b   |  32 lines

  1. on startMovie
  2.   global a, b, c
  3.   cursor(-1)
  4.   set the randomSeed to the ticks
  5.   set the keyDownScript to "printPass"
  6.   set the keyUpScript to "numsOnly"
  7.   put " " into field "Answer"
  8.   set the textSize of field "Answer" to 32
  9.   set the textSize of field "A" to 32
  10.   set the textSize of field "B" to 32
  11.   set the textSize of field "C" to 32
  12.   set the textStyle of field "Answer" to "bold"
  13.   set the textStyle of field "A" to "bold"
  14.   set the textStyle of field "B" to "bold"
  15.   set the textStyle of field "C" to "bold"
  16. end
  17.  
  18. on stopMovie
  19.   set the cursor of sprite 20 to 0
  20.   set the cursor of sprite 21 to 0
  21.   put 45 into field "Answer"
  22. end
  23.  
  24. on numsOnly
  25.   if (the key = ENTER) or (the key = RETURN) or (the keyCode = 76) then
  26.     exit
  27.   end if
  28.   if ((the key < "0") or (the key > "9")) and (the key <> "-") and (the key <> ".") and (the key <> numToChar(9)) and (the key <> numToChar(8)) then
  29.     dontPassEvent()
  30.   end if
  31. end
  32.